package com.hainatong.jcmvvmbase.mainhome.adapter;


import org.jetbrains.annotations.NotNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.jcmvvmbase.R;
import com.hainatong.jcmvvmbase.databinding.ItemApprovalMsgViewBinding;
import com.hainatong.jcmvvmbase.mainhome.entity.ApprovalMsgBean;


public class ApprovalMsgAdapter extends BaseQuickAdapter<ApprovalMsgBean, BaseDataBindingHolder<ItemApprovalMsgViewBinding>>
{
    public ApprovalMsgAdapter()
    {
        super(R.layout.item_approval_msg_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemApprovalMsgViewBinding> bindingHolder,
                           ApprovalMsgBean msgBean)
    {
        ItemApprovalMsgViewBinding binding = bindingHolder.getDataBinding();
        if (binding != null)
        {
            binding.setApprovalMsg(msgBean);
            binding.executePendingBindings();
        }
    }
}
